<?php
 function userStrToAry($string,$delimiter,$returnDselimiter,$checkAry=array(),$style='',$link='') { if (empty($delimiter)) $delimiter = ','; if (empty($returnDselimiter)) $returnDselimiter = ','; $returnStr = ''; $tmpAry = explode($delimiter, $string); foreach ($tmpAry as $val) { if (isset($checkAry[$val])) { if ($val == $_SESSION['UserName']) { $returnStr .= "<a href='".$link."' style='".$style."'>".$checkAry[$val]."</a>"; } else { $returnStr .= "<a href='".$link."' style='".$style."'>".$checkAry[$val]."</a>"; } $returnStr .= $returnDselimiter; } } $returnStr = rtrim($returnStr,$returnDselimiter); return $returnStr; } 